import { axios } from '@/utils/request'

/**
 * api接口列表
 */
const api = {
  list: '/erp_meixingtiyu/coach/list',
  add: '/erp_meixingtiyu/coach/add',
  del: '/erp_meixingtiyu/coach/del',
  info: '/erp_meixingtiyu/coach/info',
  edit: '/erp_meixingtiyu/coach/edit',
  all: '/erp_meixingtiyu/coach/all',
}

/**
 * 获取教练列表
 */
export function list (params) {
  return axios({
    url: api.list,
    method: 'get',
    params
  })
}

/**
 * 获取指定教练id的信息
 */
 export function info (params) {
  return axios({
    url: api.info,
    method: 'get',
    params
  })
}

/**
 * 添加教练
 */
 export function add (params) {
  return axios({
    url: api.add,
    method: 'get',
    params
  })
}

/**
 * 编辑教练
 */
 export function edit (params) {
  return axios({
    url: api.edit,
    method: 'get',
    params
  })
}


/**
 * 删除教练
 */
 export function del (params) {
  return axios({
    url: api.del,
    method: 'get',
    params
  })
}

/**
 * 获取所有教练的id和名称
 */
 export function all (params) {
  return axios({
    url: api.all,
    method: 'get',
    params
  })
}